﻿using System;
using System.Collections.Generic;

namespace TT.Compiler
{

    public static class Compiler
    {


        public static TT.Runtime.TTEnv Parse(string folder, ILogger logger)
        {
            CompilerContext cc = new CompilerContext(logger);
            var configfile = System.IO.Path.Combine(folder, "ttlang.json");

            var lib = cc.CreateLib(configfile);
            if (lib != null)
            {
                return cc.result;
            }
            else
            {
                return null;
            }
        }


    }
}
